//超声波

const int receivePin = 2;//接收引脚
const int emissionPin = 3;//发射引脚

void setup() {
  // put your setup code here, to run once:
  Serial.begin(9600);
  pinMode(receivePin, INPUT);
  pinMode(emissionPin, OUTPUT);
}

void loop() {
  // put your main code here, to run repeatedly:
  digitalWrite(emissionPin, LOW);
  delayMicroseconds(5);
  digitalWrite(emissionPin, HIGH);
  delayMicroseconds(12);
  digitalWrite(emissionPin, LOW);

  float volue = pulseIn(receivePin, HIGH) * 0.01715;
  Serial.println(volue);
  delay(1000);
}
